package com.study.pojo.resp;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 基础响应类
 * @author Screncea
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResultMessage {
    private Integer code;
    private String msg;
    private Object data;
    private Long total;

    public ResultMessage SUCCESS(){
        return new ResultMessage(1,"success",null,null);
    }

    public ResultMessage ERROR(){
        return new ResultMessage(0,"error",null,null);
    }

}
